(dired-insert-directory): Preserve text properties when quoting.
authorAndreas Schwab <schwab@suse.de>
Sat, 21 Dec 2002 17:04:20 +0000 (17:04 +0000)
committerAndreas Schwab <schwab@suse.de>
Sat, 21 Dec 2002 17:04:20 +0000 (17:04 +0000)
lisp/dired.el

index 68c6ffc8bc1e25b38d47edd25d0899eb5315c093..11669400ad67772df57c047ffc97eee42f0a1418 100644 (file)
@@ -693,10 +693,16 @@ If HDR is non-nil, insert a header line with the directory name."
          (setq end (point-marker))
          (goto-char opoint)
          (while (search-forward "\\" end t)
-           (replace-match "\\\\" nil t))
+           (replace-match (apply #'propertize
+                                 "\\\\"
+                                 (text-properties-at (match-beginning 0)))
+                          nil t))
          (goto-char opoint)
          (while (search-forward "\^m" end t)
-           (replace-match "\\015" nil t))
+           (replace-match (apply #'propertize
+                                 "\\015"
+                                 (text-properties-at (match-beginning 0)))
+                          nil t))
          (set-marker end nil)))
     (dired-insert-set-properties opoint (point))
     ;; If we used --dired and it worked, the lines are already indented.